#ifndef __M25PXX_H__
#define __M25PXX_H__

#include <rtthread.h>
#include <drivers/spi.h>

struct spi_flash_device
{
    struct rt_device                flash_device;
    struct rt_device_blk_geometry   geometry;
    struct rt_spi_device *          rt_spi_device;
    struct rt_mutex                 lock;
};

extern rt_err_t m25pxx_init(const char * flash_device_name,
                            const char * spi_device_name);


#endif // __M25PXX_H__
